import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext content) {
    return MaterialApp(
      title: 'flutter widget',
      //应用程序的主题，各种的定制颜色都可以设置，用于程序主题切换
      theme: ThemeData(
        //主题色 蓝色
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        appBar: AppBar(
          title: Text('RowWidget 水平布局 demo'),
        ),
        body: Row(
          children: <Widget>[
            Expanded(
              child: RaisedButton(
                onPressed: () {},
                color: Colors.orangeAccent,
                child: Text('橘色按钮'),
              ),
            ),
            MaterialButton(
              onPressed: () {},
              color: Colors.blueAccent,
              child: Text('蓝色按钮'),
            ),
            RaisedButton(
              onPressed: () {},
              color: Colors.yellowAccent,
              child: Text('黄色按钮2'),
            ),
//            Expanded(
//              child: RaisedButton(
//                  onPressed: null,
//                color:Colors.red,
//                child: Text('扩展按钮'),
//              ),
//            )
          ],
        ),
      ),
    );
  }
}


